//
//  WZProgressHUD.m
//  复合发行4.0
//
//  Created by 康世朋 on 2017/9/15.
//  Copyright © 2017年 Beijing WZYK Technology co.,ltd. All rights reserved.
//

#import "TMProgressHUD.h"
#import "SVProgressHUD.h"

@implementation TMProgressHUD
+ (void)showInfoWithStatus:(NSString *)status {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeNone];
    [SVProgressHUD showInfoWithStatus:status];
    [SVProgressHUD dismissWithDelay:1.4];
    
}
+ (void)showInfoWithStatus:(NSString *)status dismissWithDelay:(NSTimeInterval)interval {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeNone];
    [SVProgressHUD showInfoWithStatus:status];
    [SVProgressHUD dismissWithDelay:interval];
}

+ (void)showSuccessWithStatus:(NSString *)status {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeNone];
    [SVProgressHUD showSuccessWithStatus:status];
    [SVProgressHUD dismissWithDelay:1.0];
}
+ (void)showSuccessWithStatus:(NSString *)status dismissWithDelay:(NSTimeInterval)interval {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeNone];
    [SVProgressHUD showSuccessWithStatus:status];
    [SVProgressHUD dismissWithDelay:interval];
}

+ (void)showErrorWithStatus:(NSString *)status {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeNone];
    [SVProgressHUD showErrorWithStatus:status];
    [SVProgressHUD dismissWithDelay:1.0];
}
+ (void)showErrorWithStatus:(NSString *)status dismissWithDelay:(NSTimeInterval)interval {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeNone];
    [SVProgressHUD showErrorWithStatus:status];
    [SVProgressHUD dismissWithDelay:interval];
}

+ (void)showInfoUnmissWithStatus:(NSString *)status {
    [SVProgressHUD showWithStatus:status];
}
+ (void)dismissWithDelay:(NSTimeInterval)delay {
    [SVProgressHUD dismissWithDelay:delay];
}
+ (void)showProgress:(float)progress {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear];
    [SVProgressHUD showProgress:progress];
}
+ (void)showProgress:(float)progress status:(NSString *)status {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear];
    [SVProgressHUD showProgress:progress status:status];
}

+ (void)showInfoWithStyleDarkStatus:(NSString *)status {
    [SVProgressHUD showInfoWithStatus:status];
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];
    [SVProgressHUD dismissWithDelay:1.4];
}

+ (void)showSuccessWithStyleDarkStatus:(NSString *)status {
    [SVProgressHUD showSuccessWithStatus:status];
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];
    [SVProgressHUD dismissWithDelay:0.7];
}

+ (void)showErrorWithStyleDarkStatus:(NSString *)status {
    [SVProgressHUD showErrorWithStatus:status];
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];
    [SVProgressHUD dismissWithDelay:1.0];
}

+ (void)showInfoUnmissWithStyleDarkStatus:(NSString *)status {
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];
    [SVProgressHUD showWithStatus:status];
}

+ (void)dismiss {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeNone];
    [SVProgressHUD dismiss];
}

+ (void)showWithStatus:(NSString *)status {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear];
    [SVProgressHUD showWithStatus:status];
}

+ (void)show {
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear];
    [SVProgressHUD show];
}
+ (void)setHUD {
//    [SVProgressHUD setInfoImage:nil];
//    [SVProgressHUD setErrorImage:nil];
//    [SVProgressHUD setErrorImage:nil];
}
@end
